﻿/********************************************************************************
 * Developed by Phil Tyler (http://www.laidbackcoder.co.uk)
 * 
 * Cryptosolic is Licensed under the GNU Lesser General Public License (LGPL)
 * http://cryptosolic.codeplex.com/license
 * *****************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cryptosolic.Utilities;

namespace Cryptosolic.Security
{
	/// <summary>
	/// Plain Text Unencrypted Data
	/// </summary>
    public class PlainText
    {
        internal byte[] PlainBytes;

        /// <summary>
        /// Plain Text
        /// </summary>
        /// <param name="plainBytes">Data as a Byte Array</param>
        public PlainText(byte[] plainBytes)
        {
            this.PlainBytes = plainBytes;
        }

        /// <summary>
        /// Return Data as a Ascii String
        /// </summary>
        /// <returns>Secure Data</returns>
        public override string ToString()
        {
            return DataConverter.BytesToString(this.PlainBytes);
        }

        /// <summary>
        /// Return Data as a Byte Array
        /// </summary>
        /// <returns>Secure Data</returns>
        public virtual byte[] ToBytes()
        {
            return this.PlainBytes;
        }
    }
}
